package com.randao.manage.firstPage.service;

import com.randao.framework.model.domain.house.Houses;
import com.randao.manage.firstPage.dao.HousesTestRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * @Author： ~Mr·Weng~
 * @CreateTime： 2019年-04月-24日  1:13
 * Look at the wine in the glass toast the rich first.
 */
@Service
public class HousesTestService {

    @Autowired
    private HousesTestRepository housesTestRepository;


    public Houses findByHid(Integer hid) {
        Optional<Houses> optionalHouses = housesTestRepository.findById(hid);
        Houses houses = null;
        if (optionalHouses.isPresent()) {
            houses = optionalHouses.get();

        }
        return houses;
    }


}
